home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Graphics / Utilities / POVRAY / POV-Ray (68040) / Helicoidal_Scale.POV < prev    next >
Text File  |  1994-03-30  |  5KB  |  154 lines

  1. //   Persistence Of Vision raytracer version 2.0 sample file.
  2. //    You will need the "Pov-Ray (68040)" version to run it.
  3.  
  4. /*
  5.                                                 ! WARNING !
  6.      
  7.      This file has been disigned to be rendered with an unofficial
  8.      version of Pov-Ray, which is not supported by the POV-Ray team.
  9.      You can get this version by anonymous ftp at the following address
  10.                       sumex-aim.stanford.edu (36.44.0.6) 
  11.                    and download the "POV-68040.hqx" package.
  12.      
  13.    This version supports trigonometric fuctions and loops in the scene description.
  14.    You will need a 68040 tu run it, but you will be able to render scenes quicker
  15.    than with the official version. The speed gain ranges from 3% to 42% (average 12%)
  16.  
  17. */
  18.  
  19. // Example using loops to describe a scene: Helicoidal wooden scale.
  20. // ©N.Guex, March 1994
  21.  
  22. /*
  23.   You can use, modify and include these columns freely in your scenes,
  24.   BUT : WARNING !
  25. • If you decide to share or post a scene that need any of the new features
  26. • to be rendered, you MUST indicate clearly that this scene was designed
  27. • specifically for my version and that it will request it to be rendered.
  28. • Specify also where users can find my version, and the type of computer
  29. • needed (Macintosh with 68040).
  30. • This is only to insure that regular users will not be confused with some
  31. • scenes that they are unable to render.
  32. */
  33.  
  34. #include "FOV.inc"
  35. #include "colors.inc"
  36. #include "textures.inc"
  37. #include "shapes.inc"
  38. #include "stones.inc"
  39.  
  40.  
  41. #declare posCamera = <0 ,30 ,-50 >
  42. #declare lookWhere = <0, -900, 3500> 
  43.  
  44. #declare XLight1 = -40                  
  45. #declare YLight1 =  37                  
  46. #declare ZLight1 = -40                
  47.  
  48. #declare XLight2 = 50                  
  49. #declare YLight2 = 60                 
  50. #declare ZLight2 = -15  // -10               
  51.  
  52.  
  53. //••••••••••• Ligths & Camera •••••••••••
  54.  
  55. camera {
  56.    location  posCamera
  57.    direction <0 0 FoV_15>
  58.    up        <0 10 0>
  59.    right     <13.3 0 0>
  60.    sky       <0 10 0>
  61.    look_at   lookWhere  
  62.    rotate    <0 0 0>        
  63. }
  64.  
  65. object { 
  66.   light_source { <XLight1, YLight1, ZLight1>       
  67.                  color red 2 green 2 blue 2 }
  68. }
  69.  
  70. object { 
  71.   light_source { <XLight2, YLight2, ZLight2>          
  72.                  color red 1.1 green 1.1 blue 1.1  }
  73. }
  74.  
  75. //••••••• O B J E C T S ••••••••
  76.  
  77. //-------------------------------------------------
  78. // Declare an Helicoidal Scale
  79. //-------------------------------------------------
  80.  
  81. #declare ScaleLength = 6
  82. #declare ScaleWidth =  3
  83. #declare ScaleHeight = 9
  84. #declare r1 = ScaleLength * 1.99999 // by decreasing this value, the "fences" are removed     
  85. #declare floorLevel = 25
  86. #declare StepAngle= +atan(ScaleWidth/r1)                    
  87. #declare nbSteps = 38 
  88.  
  89. #declare OneScale =
  90.  object {    
  91.    intersection {
  92.        box { <0 , -(ScaleHeight+1),  -ScaleLength> <ScaleWidth, 0,  0> }
  93.                          box { <0 , -100,  -100> <100 , 0,  0>  rotate < 0, 0, -atan(1/ScaleWidth) > }  
  94.    }
  95.    bounded_by { 
  96.        object { box { <0 , -(ScaleHeight+1),  -ScaleLength> <ScaleWidth, 0,  0> } }
  97.    }
  98.    translate < -(ScaleWidth/2), ScaleHeight+1, 0> 
  99.  }
  100.  
  101. #declare Helicoidal_Scale =
  102.  object {                                          
  103.    difference {
  104.       object { Cylinder_Y 
  105.                texture { DMFDarkOak 
  106.                          turbulence 0.1 rotate < 45 0 60 > scale <.3 .3 .3>  } 
  107.                scale < r1 r1 r1 >  } 
  108.                      FOR i <0, StepAngle*nbSteps, StepAngle > 
  109.       object { OneScale
  110.                   translate < 0, (1/StepAngle)*i-10, -ScaleLength > 
  111.                rotate < 0, i, 0 > 
  112.       } 
  113.       ENDFOR
  114.       object { OneScale translate < 0, -10, -ScaleLength*1.5 >} // remove 1st security bar
  115.       object { OneScale translate < 0, -9 , -ScaleLength*1.5 > // remove 2nd security bar
  116.                rotate < 0, StepAngle, 0 >   }    
  117.    }  
  118.     texture { DMFLightOak turbulence 0.1 rotate < 20 30 15 > scale <.22 .22 .22> }
  119.     bounded_by { object { Cylinder_Y scale < r1 r1 r1 > 
  120.                           clipped_by { plane { <0, -1, 0 > (floorLevel+1) } }
  121.                  }
  122.     }
  123.  }
  124.  
  125. //••••••••••• I M A G E ••••••••••••
  126.  
  127. object { Helicoidal_Scale }
  128.  
  129. //--------- SKY --------- 
  130.  
  131. object {
  132.    plane { <0 1 0> 40 }
  133.    texture {
  134.       Bright_Blue_Sky
  135.       turbulence 0.8     
  136.       scale <10 12 12 > 
  137.       translate < -3, 0, -10>
  138.     finish {
  139.       reflection 0
  140.       ambient 0.45
  141.       diffuse .0175
  142.     }
  143.    }
  144.    no_shadow
  145.  
  146. //--------- GROUND --------- 
  147.  
  148. object {
  149.   plane { <0, -1, 0> floorLevel }
  150.   texture { Grnt10 }
  151.   scale <.4 .4 .4>
  152. }
  153.